package lab02.test37;

public class StudentDemo {
    public static void main(String[] args) {

        Undergraduate undergraduate=new Undergraduate();
        undergraduate.name="张三";
        undergraduate.math=89;
        undergraduate.english=78;
        undergraduate.java=90;

        Graduate graduate=new Graduate();
        graduate.name="小明";
        graduate.math=45;
        graduate.english=60;
        graduate.java=70;

        if(undergraduate.average()>60){
            System.out.println("本科生"+undergraduate.name+"通过");
        }
        else System.out.println("本科生"+undergraduate.name+"不通过");

        if(graduate.average()>80){
            System.out.println("研究生"+graduate.name+"通过");
        }
        else System.out.println("研究生"+graduate.name+"不通过");



    }
}
